package com.tansun.easycare.rule.policytree.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.tansun.easycare.rule.common.model.BaseItem;
import com.tansun.easycare.rule.common.model.BomField;

public class PolicyTreeScene extends BaseItem implements Serializable {


    private static final long serialVersionUID = 8713037292246735370L;
    /**
     * id
     */
    private String id;

    /**
     * 名称：对应数据模型英文名
     */
    private String name;
    /**
     * 显示名称：对应数据模型中文名
     */
    private String label;

    /**
     * 默认选中的动作场景Id;
     */
    private String defaultActionId;

    /**
     * 参数值组
     */
    private String controlValue;

    /**
     * 输出变量列表
     */
    private List<PolicyTreeScene> outputVariables;

    public String getControlValue() {
        return controlValue;
    }

    public void setControlValue(String controlValue) {
        this.controlValue = controlValue;
    }

    public List<PolicyTreeScene> getOutputVariables() {
        if (outputVariables == null)
            outputVariables = new ArrayList<PolicyTreeScene>();
        return outputVariables;
    }

    public void setOutputVariables(List<PolicyTreeScene> outputVariables) {
        this.outputVariables = outputVariables;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }


    public String getDefaultActionId() {
        return defaultActionId;
    }

    public void setDefaultActionId(String defaultActionId) {
        this.defaultActionId = defaultActionId;
    }

    public void initSceneModel(BomField param) {
        this.setClassName(param.getClassName());
        this.setCollection(param.getCollection());
        this.setDataType(param.getDataType());
        this.setDefaultValue(param.getDefaultValue());
        this.setDomain(param.getDomain());
        this.setIsDerives(param.getIsDerives());
        this.setLabel(param.getLabel());
        this.setName(param.getName());
    }
}
